package com.general.message.push.domain;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class PushMessageLog {

    private Long receiveUserId;
    private Long senderUserId;
    private String message;
    private LocalDateTime sendTime;

    /**
     * 系统消息日志
     * @param receiveUserId
     * @param message
     * @return {@code PushMessageLog}
     */
    public static PushMessageLog ofSysLog(Long receiveUserId, SimpleMessage message) {
        PushMessageLog log = new PushMessageLog();
        log.setSenderUserId(-1L);
        log.setSendTime(LocalDateTime.now());
        return log;
    }

}
